package cn.itsource.hrm.domain;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author yaosang
 * @since 2022-01-23
 */
@TableName("t_order")
public class Order extends Model<Order> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 订单编号
     */
    @TableField("order_no")
    private String orderNo;
    /**
     * 支付总的价格
     */
    @TableField("total_price")
    private BigDecimal totalPrice;
    /**
     * 秒杀数量
     */
    private Integer count;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     *  订单状态 ： 
0下单成功待支付，
1支付成功待出货，
2出货成功订单完成 
3用户手动取消订单(未支付)
4.支付失败/超时自动订单取消,
5.出货失败
     */
    @TableField("status_order")
    private Integer statusOrder;
    /**
     * 支付状态：  
0待支付 ，
1支付完成 
2支付失败
3.订单超时未支付
     */
    @TableField("status_pay")
    private String statusPay;
    /**
     * 秒杀场次ID
     */
    @TableField("sessions_id")
    private Long sessionsId;
    /**
     * 最后确认时间
     */
    @TableField("last_confirm_time")
    private Date lastConfirmTime;
    /**
     * 最后支付更新时间
     */
    @TableField("last_pay_time")
    private Date lastPayTime;
    /**
     * 用户
     */
    @TableField("user_id")
    private Long userId;

    @TableField("order_type")
    private Integer orderType;

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStatusOrder() {
        return statusOrder;
    }

    public void setStatusOrder(Integer statusOrder) {
        this.statusOrder = statusOrder;
    }

    public String getStatusPay() {
        return statusPay;
    }

    public void setStatusPay(String statusPay) {
        this.statusPay = statusPay;
    }

    public Long getSessionsId() {
        return sessionsId;
    }

    public void setSessionsId(Long sessionsId) {
        this.sessionsId = sessionsId;
    }

    public Date getLastConfirmTime() {
        return lastConfirmTime;
    }

    public void setLastConfirmTime(Date lastConfirmTime) {
        this.lastConfirmTime = lastConfirmTime;
    }

    public Date getLastPayTime() {
        return lastPayTime;
    }

    public void setLastPayTime(Date lastPayTime) {
        this.lastPayTime = lastPayTime;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Order{" +
        ", id=" + id +
        ", orderNo=" + orderNo +
        ", totalPrice=" + totalPrice +
        ", count=" + count +
        ", createTime=" + createTime +
        ", statusOrder=" + statusOrder +
        ", statusPay=" + statusPay +
        ", sessionsId=" + sessionsId +
        ", lastConfirmTime=" + lastConfirmTime +
        ", lastPayTime=" + lastPayTime +
        ", userId=" + userId +
        "}";
    }
}
